package b.l.a;

import android.view.animation.Interpolator;
import androidx.fragment.app.Fragment;
import b.n.p;
import b.n.q;
import b.n.s;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

/* compiled from: FragmentManagerViewModel */
public class m extends p {
    public static final q g = new a();
    public final HashSet<Fragment> b = new HashSet();
    public final HashMap<String, m> c = new HashMap();
    public final HashMap<String, s> d = new HashMap();
    public final boolean e;
    public boolean f = false;

    /* compiled from: FragmentManagerViewModel */
    public static class a implements q {
        public <T extends p> T a(Class<T> cls) {
            return new m(true);
        }
    }

    public m(boolean z) {
        this.e = z;
    }

    public void a() {
        Interpolator interpolator = i.G;
        this.f = true;
    }

    public boolean b(Fragment fragment) {
        if (this.b.contains(fragment) && this.e) {
            return this.f;
        }
        return true;
    }

    public boolean equals(Object obj) {
        boolean z = true;
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        m mVar = (m) obj;
        if (!(this.b.equals(mVar.b) && this.c.equals(mVar.c) && this.d.equals(mVar.d))) {
            z = false;
        }
        return z;
    }

    public int hashCode() {
        return this.d.hashCode() + ((this.c.hashCode() + (this.b.hashCode() * 31)) * 31);
    }

    public String toString() {
        String str;
        StringBuilder stringBuilder = new StringBuilder("FragmentManagerViewModel{");
        stringBuilder.append(Integer.toHexString(System.identityHashCode(this)));
        stringBuilder.append("} Fragments (");
        Iterator it = this.b.iterator();
        while (true) {
            str = ", ";
            if (!it.hasNext()) {
                break;
            }
            stringBuilder.append(it.next());
            if (it.hasNext()) {
                stringBuilder.append(str);
            }
        }
        stringBuilder.append(") Child Non Config (");
        it = this.c.keySet().iterator();
        while (it.hasNext()) {
            stringBuilder.append((String) it.next());
            if (it.hasNext()) {
                stringBuilder.append(str);
            }
        }
        stringBuilder.append(") ViewModelStores (");
        it = this.d.keySet().iterator();
        while (it.hasNext()) {
            stringBuilder.append((String) it.next());
            if (it.hasNext()) {
                stringBuilder.append(str);
            }
        }
        stringBuilder.append(')');
        return stringBuilder.toString();
    }
}
